import { COMMUNITY_TYPE } from './abstract-community';
import { DefaultStage } from '../default-stage';
import { ITownOptions, Town } from './town';
import { ICityData } from '../../data/community';
import { CommunityData } from './community-data';
import { Mesh } from '@babylonjs/core';


interface ICityOptions extends ITownOptions {
    //
}


class City extends Town {

    constructor(stage: DefaultStage, options: ICityOptions) {
        super(stage, options);
    }

    public get type(): COMMUNITY_TYPE {
        return COMMUNITY_TYPE.CITY;
    }

    public get data(): ICityData {
        return CommunityData.cityData[this.dataIndex];
    }

    protected initializePickMesh(): Mesh {
        const m = super.initializePickMesh();
        m.scaling.set(0.4, 0.12, 0.4);
        m.position.y = 0.06;
        m.visibility = 0;
        return m;
    }
}


export { City };
export type { ICityOptions };